class animal:
    def __init__(self):
        self.height = self.max_height


class mianyang(animal):
    max_height = 100

    def __init__(self):
        super().__init__()

    def eat(self,food):
        if food == 'grass':
            self.height += 10
        if food == 'meat':
            self.height -= 10
    
    def jiao(self):
        print('miem~ie~mie~~')

class tiger(animal):
    max_height = 200

    def __init__(self):
        super().__init__()

    def eat(self,food):
        if food == 'grass':
            self.height -= 10
        if food == 'meat':
            self.height += 10
    
    def jiao(self):
        print('Wow~~')
    
t = tiger()
t.jiao()
t.eat('meat')
print(t.height)

class Car:    
    brand   = '未知，在子类中定义'  
    country = '未知，在子类中定义'  

    @classmethod
    def pressHorn(cls): 
        print(f'当前的类是 {cls}')
        print(f'本车品牌是 {cls.brand}，来自 {cls.country}')
        print('嘟嘟~~~~~~')

class BenzCar(Car):    
    brand   = '奔驰'  
    country = '德国'  

class CamaryCar(Car):    
    brand   = '凯美瑞'  
    country = '日本' 

BenzCar.pressHorn()
CamaryCar.pressHorn()